﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductAtWarrantyDep.aspx.cs" Inherits="MonkeyWarranty.Web.WarrantyTickets.ProductAtWarrantyDep" %>

<%@ Import Namespace="Resources" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title>
        <%= GlobalStrings.AtWarrantyDep %></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <h3><%= GlobalStrings.AtWarrantyDep %></h3>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <!-- Nav tabs -->
            <div id="ProductsAtWarrantyDep"></div>
        </div>
    </div>

    <script type="text/javascript">
        $(function () {
            $("#menu-warranty").addClass("active");
            $("#menu1-warranty").addClass("collapse in");
            $("#menu1-process").addClass("active");
            LoadProductsAtWarrantyDep();
        });
    </script>

    <script type="text/javascript">
        function LoadProductsAtWarrantyDep() {
            $.blockUI();
            $('#ProductsAtWarrantyDep').jtable({
                paging: true,
                pageSize: 15,
                sorting: true,
                defaultSorting: 'Name ASC',
                actions: {
                    listAction: 'ProductAtWarrantyDep.aspx/ProductsAtWarrantyDep'
                },
                fields: {
                    Id: {
                        key: true,
                        create: false,
                        edit: false,
                        list: false
                    },
                    TicketCode: {
                        title: '<%= GlobalStrings.TicketCode %>'
                    },
                    Code: {
                        title: '<%= GlobalStrings.ProductCode %>',
                        display: function (data) {
                            return '<a href="SendToSupplier.aspx?id=' + data.record.Id + '" >' + data.record.Code + '</a>';
                        }
                    },
                    Name: {
                        title: '<%= GlobalStrings.ProductName %>',
                        display: function (data) {
                            return '<a href="SendToSupplier.aspx?id=' + data.record.Id + '" >' + data.record.Name + '</a>';
                        }
                    },
                    EmployeeName: { title: '<%=GlobalStrings.ProcessEmployee %>' },
                    <%--Model: {
                        title: '<%= GlobalStrings.Model %>',
                        sorting: false
                    },
                    ManufacturerName: {
                        title: '<%= GlobalStrings.Manufacturers %>',
                        sorting: false
                    },
                    Serial: {
                        title: '<%= GlobalStrings.Serial %>',
                        sorting: false
                    },--%>
                    Quantity: {
                        width: '5%',
                        title: '<%= GlobalStrings.Quantity %>',
                        sorting: false
                    },
                    CreatedDate: {
                        title: '<%=GlobalStrings.ReceivedDate %>',
                        type: 'date',
                        displayFormat: 'dd/mm/yy'
                    },
                    SentDate: {
                        title: '<%=GlobalStrings.SentDate %>',
                        type: 'date',
                        displayFormat: 'dd/mm/yy'
                    },
                    WishDate: {
                        title: '<%=GlobalStrings.WishDate %>',
                        type: 'date',
                        displayFormat: 'dd/mm/yy'
                    }
                    <%--WarrantyTypeName: {
                        title: '<%= GlobalStrings.WarrantyType %>',
                        sorting: false
                    },
                    ReceivedFromName: { title: '<%= GlobalStrings.ReceivedFrom %>', sorting: false },
                    DealerEmployeeName: { title: '<%= GlobalStrings.ReceivedFromName %>', width: '20%', sorting: false },
                    CustomerName: { title: '<%= GlobalStrings.Customers %>', sorting: false },
                    Phone: { title: '<%= GlobalStrings.Phone %>', sorting: false }--%>
                }
            });

            $('#ProductsAtWarrantyDep').jtable('load');
        }
    </script>
</asp:Content>
